// eslint-disable-next-line
const path = require('path');

function rewireEslint(config) {
  const rules = config.module.rules;
  const pre = rules.find(rule => rule.enforce === 'pre');
  pre.use[0].options.baseConfig = {
    extends: path.join(__dirname, '.eslintrc.json')
  };
  return config;
}
module.exports = function override(config, env) {
  // do stuff with the webpack config...
  return rewireEslint(config);
};
